<?php

namespace App\models\user;

use Illuminate\Database\Eloquent\Model;

/**
 * App\models\user\EmailToken
 *
 * @property int $id
 * @property int $uid
 * @property int $type
 * @property string $token
 * @property int $dead_time
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereUid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereType($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereToken($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereDeadTime($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\EmailToken whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class EmailToken extends Model{
    public static function deleteToken($uid, $type){
        self::where('uid', $uid)->where('type', $type)->delete();
    }
}
